package com.yaodian100.ec.shelf.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.yaodian100.core.common.entity.BaseEntity;

@Entity
@Table(name = "EC_SHELF_TUANGOU")
public class ShelfTuangou extends BaseEntity {

	/** serial version */
	private static final long serialVersionUID = -427104292705986178L;

	/** 團購上架編號 */
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_ec_shelf_tuangou")
	@SequenceGenerator(name = "seq_ec_shelf_tuangou", sequenceName = "SEQ_EC_SHELF_TUANGOU")
	@Column(name = "TUANGOU_ID")
	private Long tuangouId;

	/** 商品編號 */
	@Column(name = "PRODUCT_ID", length = 8)
	private String productId;

	/** 活动起始日期時間 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "START_DATE")
	private Date startDate;

	/** 活动結束日期時間 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "END_DATE")
	private Date endDate;

	/** 團購活动售價 */
	@Column(name = "PRICE", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal price;

	/** 訂購人數 */
	@Column(name = "ORDER_QTY")
	private int orderQty;

	/** 取消人數 */
	@Column(name = "CANCEL_QTY")
	private int cancelQty;

	/** 最低訂購成團人數 */
	@Column(name = "LOWEST_ORDER_QTY")
	private int lowestOrderQty;

	/**
	 * 會員是否限購买1次 Y:是 N:否
	 */
	@Column(name = "MEMBER_LIMIT", length = 1)
	private String memberLimit;

	/** 活動上架狀態 */
	@Column(name = "STATUS", length = 6)
	private String status;

	/** 備註 */
	@Column(name = "MEMO", length = 300)
	private String memo;

	/** 團購商品促銷小標 */
	@Column(name = "PROMOTE_NAME", length = 300)
	private String promoteName;

	/**
	 * 審核人
	 */
	@Column(name = "APPROVE_USER")
	private String approveUser;

	/**
	 * 審核日期
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "APPROVE_DATE")
	private Date approveDate;

	/**
	 * 審核失敗原因
	 */
	@Column(name = "APPROVE_FAIL_REASON")
	private String approveFailReason;

	/**
	 * 團購廣告顯示順序 0:置頂 1:中 2:低
	 */
	@Column(name = "SORT_SEQ", length = 1)
	private String sortSeq;

	/**
	 * 销售方式 1:一般 2:抽奖
	 */
	@Column(name = "SALES_TYPE", length = 1)
	private String salesType;

	/**
	 * 团购结团状态 0:初始 1:结团 2:流团
	 */
	@Column(name = "TUANGOU_STATUS", length = 1)
	private String tuangouStatus = "0";
	
	/** 團購說明 */
	@Column(name = "PRIZE_DESC", length = 500)
	private String prizeDesc;

	// getter & setter
	public Long getTuangouId() {
		return tuangouId;
	}

	public void setTuangouId(Long tuangouId) {
		this.tuangouId = tuangouId;
	}

	public String getProductId() {
		return productId;
	}

	public void setProductId(String productId) {
		this.productId = productId;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public int getOrderQty() {
		return orderQty;
	}

	public void setOrderQty(int orderQty) {
		this.orderQty = orderQty;
	}

	public int getCancelQty() {
		return cancelQty;
	}

	public void setCancelQty(int cancelQty) {
		this.cancelQty = cancelQty;
	}

	public int getLowestOrderQty() {
		return lowestOrderQty;
	}

	public void setLowestOrderQty(int lowestOrderQty) {
		this.lowestOrderQty = lowestOrderQty;
	}

	public String getMemberLimit() {
		return memberLimit;
	}

	public void setMemberLimit(String memberLimit) {
		this.memberLimit = memberLimit;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public String getPromoteName() {
		return promoteName;
	}

	public void setPromoteName(String promoteName) {
		this.promoteName = promoteName;
	}

	public String getApproveUser() {
		return approveUser;
	}

	public void setApproveUser(String approveUser) {
		this.approveUser = approveUser;
	}

	public Date getApproveDate() {
		return approveDate;
	}

	public void setApproveDate(Date approveDate) {
		this.approveDate = approveDate;
	}

	public String getApproveFailReason() {
		return approveFailReason;
	}

	public void setApproveFailReason(String approveFailReason) {
		this.approveFailReason = approveFailReason;
	}

	public String getSortSeq() {
		return sortSeq;
	}

	public void setSortSeq(String sortSeq) {
		this.sortSeq = sortSeq;
	}

	public String getSalesType() {
		return salesType;
	}

	public void setSalesType(String salesType) {
		this.salesType = salesType;
	}

	/**
	 * @return the tuangouStatus
	 */
	public String getTuangouStatus() {
		return tuangouStatus;
	}

	/**
	 * @param tuangouStatus the tuangouStatus to set
	 */
	public void setTuangouStatus(String tuangouStatus) {
		this.tuangouStatus = tuangouStatus;
	}

	public String getPrizeDesc() {
		return prizeDesc;
	}

	public void setPrizeDesc(String prizeDesc) {
		this.prizeDesc = prizeDesc;
	}
}